<?php if (!defined('THINK_PATH')) exit(); /*a:4:{s:77:"/www/wwwroot/v.zhongbaolb.cn/public/../application/admin/view/link/muban.html";i:1602913500;s:71:"/www/wwwroot/v.zhongbaolb.cn/application/admin/view/layout/default.html";i:1605772860;s:68:"/www/wwwroot/v.zhongbaolb.cn/application/admin/view/common/meta.html";i:1603638060;s:70:"/www/wwwroot/v.zhongbaolb.cn/application/admin/view/common/script.html";i:1603638060;}*/ ?>
<!DOCTYPE html>
<html lang="<?php echo $config['language']; ?>">
    <head>
        <meta charset="utf-8">
<title><?php echo (isset($title) && ($title !== '')?$title:''); ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta name="renderer" content="webkit">

<link rel="shortcut icon" href="/assets/img/favicon.ico" />
<!-- Loading Bootstrap -->
<link href="/assets/css/backend.css?v=<?php echo \think\Config::get('site.version'); ?>" rel="stylesheet">

<!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
<!--[if lt IE 9]>
  <script src="/assets/js/html5shiv.js"></script>
  <script src="/assets/js/respond.min.js"></script>
<![endif]-->
<script type="text/javascript">
    var require = {
        config:  <?php echo json_encode($config); ?>
    };
</script>
    </head>

    <body class="inside-header inside-aside <?php echo defined('IS_DIALOG') && IS_DIALOG ? 'is-dialog' : ''; ?>">
        <div id="main" role="main">
            <div class="tab-content tab-addtabs">
                <div id="content">
                    <div class="row">
                        <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
                            <section class="content-header hide">
                                <h1>
                                    <?php echo __('Dashboard'); ?>
                                    <small><?php echo __('Control panel'); ?></small>
                                </h1>
                            </section>
                            <?php if(!IS_DIALOG && !\think\Config::get('fastadmin.multiplenav')): ?>
                            <!-- RIBBON -->
                            <div id="ribbon">
                               <!-- <ol class="breadcrumb pull-left">
                                    <li><a href="dashboard" class="addtabsit"><i class="fa fa-dashboard"></i> <?php echo __('Dashboard'); ?></a></li>
                                </ol>
                                <ol class="breadcrumb pull-right">
                                    <?php foreach($breadcrumb as $vo): ?>
                                    <li><a href="javascript:;" data-url="<?php echo $vo['url']; ?>"><?php echo $vo['title']; ?></a></li>
                                    <?php endforeach; ?>
                                </ol>-->
                            </div>
                            <!-- END RIBBON -->
                            <?php endif; ?>
                            <div class="content">
                                

<style>
    #ribbon{
        display: none;
    }
</style>

<div class="layui-col-md12 ">
            <?php if(is_array($list) || $list instanceof \think\Collection || $list instanceof \think\Paginator): if( count($list)==0 ) : echo "" ;else: foreach($list as $k=>$vo): ?>

            <div class="content-main layui-col-md3 layui-col-sm12">

                <div class="layui-fluid">

                    <div class="layui-card">

                        <div class="layui-card-header">
                            <?php echo $vo['title']; ?>
                        </div>

                        <div class="layui-card-body" style="text-align:center;">
                            <form class="layui-form">
                                <div class="layui-form-item">
                                    <img src="<?php echo $vo['image']; ?>" style="height:300px;width: 100%"/>
                                </div>
                                <div class="layui-form-item">
                                    <input type="hidden"  autocomplete="off" name="title" class="layui-input" value="<?php echo $vo['title']; ?>">
                                    <input type="hidden"  autocomplete="off" name="muban" class="layui-input" value="<?php echo $vo['muban']; ?>">
                                    <input type="hidden" name="id" value="<?php echo $vo['id']; ?>">
                                    <?php if($userinfo['view_id'] == $vo['id']): ?>
                                        <button class="layui-btn layui-col-md12 layui-col-sm12 layui-btn-disabled">当前模板</button>
                                        <?php else: ?>
                                        <button type="button" class="sub layui-btn layui-col-md12 layui-col-sm12" lay-submit="" lay-filter="sub">切换到模板</button>
                                    <?php endif; ?>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
            <?php endforeach; endif; else: echo "" ;endif; ?>
</div>






            <script type="text/javascript" src="/assets/libs/layui/layui.all.js"></script>



    <script type="text/javascript">





        layui.use(['jquery','form'], function(){

            var form = layui.form

                ,$=layui.jquery;


            $(".sub").click(function(){
                var info = $(this).parents('form').serialize();
                $.ajax({

                    url: "",

                    type : "POST",

                    dataType:'json',

                    data:info,

                    cache: false,

                    async:false,

                    success: function (data) {

                        if (data.code == 0) {

                            layer.msg(data.msg,{time:1500},function(){

                                parent.layer.closeAll();

                                //window.parent.location.reload();

                            });

                        }else{

                            layer.msg(data.msg);

                        }

                    }

                });
            });

            //监听提交





        });



    </script>

</block>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <script src="/assets/js/require.js" data-main="/assets/js/require-backend.js?v=<?php echo htmlentities($site['version']); ?>"></script>
    </body>
</html>